<template>
	<view class="container">
		<view style="width: 100%;height: 20rpx;"></view>
		<view class="list_view">
			<view class="item_view">
				<view class="title_view Text33">
					{{ cardName }}
				</view>
				<view class="row_view Text88Nor">
					<view class="left_view">
						车站
					</view>
					<view class="right_view">
						{{ dataModel.tenantName }}
					</view>
				</view>
				<view class="row_view Text88Nor">
					<view class="left_view">
						区域
					</view>
					<view class="right_view">
						{{ dataModel.area }}
					</view>
				</view>
				<view class="row_view Text88Nor">
					<view class="left_view">
						安装位置
					</view>
					<view class="right_view">
						{{ dataModel.location }}
					</view>
				</view>
				<view class="row_view Text88Nor">
					<view class="left_view">
						状态
					</view>
					<view class="right_view">
						{{ deviceStatusEnum(dataModel.status) }}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				cardName: '',
				dataModel: {}
			}
		},
		onLoad() {
			this.dataModel = this.$Route.query.device
			this.cardName = this.$Route.query.cardName
			console.log(222, this.dataModel);
		},
		methods: {
			deviceStatusEnum(e) {
				switch (e) {
					case 1:
						return '在线'
					case 2:
						return '离线'
					default:
						break
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100%;
		min-height: 100vh;
		box-sizing: border-box;
		background-color: #F8F8F8;
	}

	.list_view {
		padding: 20rpx;
		padding-top: 0;

		.item_view {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			// align-items: center;
			padding: 20rpx;
			margin: 20rpx 0;
			background-color: #FFFFFF;
			border-radius: 10rpx;

			.title_view {
				margin-bottom: 10rpx;
			}

			.row_view {
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				padding: 20rpx;
				border-bottom: 1rpx solid #E8E8E8;
			}
		}
	}

	.bottom_view {
		width: 100%;
		height: 100rpx;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		align-items: center;

		.again_view {
			width: 35%;
			height: 80rpx;
			border: 2rpx solid #333333;
			display: flex;
			justify-content: center;
			align-items: center;
			border-radius: 5rpx;
		}

		.next_view {
			width: 35%;
			height: 80rpx;
			border: 2rpx solid #333333;
			background-color: blue;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #ffffff;
			border-radius: 5rpx;
		}
	}
</style>